<!--
 * @Author: wangjian
 * 656876071@qq.com
 * @Date: 2024-07-19 11:39:23
 * @LastEditTime: 2024-08-02 17:12:35
 * @FilePath: src/views/sxln/member/bak/EntranceBak.vue
 * @Description: 
 -->
<script setup lang="ts">
import {h} from 'vue'
import {SearchOutlined, CiCircleFilled} from '@ant-design/icons-vue'
import {useEntrance} from "@/views/sxln/member/LnMemberHooks";
import useUpload from './Upload'
const {form, dataSource, columns,reset, query} = useEntrance()
const { uploadList,customUpload, handleChange, beforeUpload} = useUpload()
</script>

<template>
  <a-form layout="inline" class="query-form">
    <a-form-item label="姓名">
      <a-input placeholder="请输入姓名" allow-clear v-model:value="form.realName"/>
    </a-form-item>
    <a-form-item label="会员号">
      <a-input placeholder="请输入会员号" allow-clear v-model:value="form.memberId"/>
    </a-form-item>
    <a-form-item>
      <a-button type="default" @click="query" :icon="h(SearchOutlined)">查询</a-button>
    </a-form-item>
    <a-form-item>
      <a-button type="primary" style="background-color: orange" @click="reset" :icon="h(CiCircleFilled)">重置</a-button>
    </a-form-item>
    
    <div>
      <a-upload
          v-model:file-list="uploadList"
          name="file"
          list-type="picture-card"
          class="avatar-uploader"
          :show-upload-list="false"
          action="http://127.0.0.1:8081/file/storage/upload-post"
          :before-upload="beforeUpload"
          @change="handleChange"
      >
<!--        <img v-if="imageUrl" :src="imageUrl" alt="avatar" />-->
<!--        <div v-else>-->
<!--          <loading-outlined v-if="loading"></loading-outlined>-->
<!--          <plus-outlined v-else></plus-outlined>-->
<!--          <div class="ant-upload-text">Upload</div>-->
<!--        </div>-->
        upload
      </a-upload>
    </div>
  </a-form>
  <a-table class="table-container" bordered
           :data-source="dataSource"
           :columns="columns"
           :title="() => '人员信息'"
  >
  </a-table>
</template>

<style scoped>
.query-form {
  margin: 1rem;
}


</style>